<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>优惠券</title>
    <link rel="stylesheet" href="../css/conment.css">
    <link rel="stylesheet" href="../css/coupon.css">
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../fonts/css/font-awesome.css">
</head>

<body>
    <!-- 顶部 -->
    <header>
        <div class="header-one" id="header-Mall">
            <span class="Mall-left"><a href="../index.html"><i class="fa fa-chevron-left" aria-hidden="true"></i></a></span>
            <span class="clearfix Mall-conter"><a href="javascript:;">商品导航</a></span>
            <span class="clearfix Mall-right"><a href="javascript:;"><img src="../images/header_app.png" alt=""></i></a></span>
        </div>
    </header>
    <!-- 用于撑开头部 -->
    <div class="tmp" id="tmp"></div>
    <!-- 内容 -->
    <div class="content clearfix">
        <div class="yhq">
            <a href="./couponproduct.html">
                <img src="" alt="">
                <div></div>
            </a>
        </div>
        <!-- <div class="yhq">
            <a href="javascript:;">
                <img src="http://www.juanlaoda.com/ImageUpload/2013310191729944.jpg" alt="">
                <div>肯德基</div>
            </a>
        </div>
        <div class="yhq">
            <a href="javascript:;">
                <img src="http://www.juanlaoda.com/ImageUpload/2013310191729944.jpg" alt="">
                <div>肯德基</div>
            </a>
        </div>
        <div class="yhq">
            <a href="javascript:;">
                <img src="http://www.juanlaoda.com/ImageUpload/2013310191729944.jpg" alt="">
                <div>肯德基</div>
            </a>
        </div> -->
    </div>
    <!-- 位置 -->
    <div class="location">
        <span>首页</span>
        <i class="fa fa-angle-right" aria-hidden="true"></i>
        <span>优惠券</span>
    </div>
    <!-- 底部 -->
    <footer id="dibu">
        <div>
            <span>品牌排行</span>
            <span><i class="fa fa-chevron-circle-right" aria-hidden="true"></i></span>
        </div>
        <div>
            <span>登陆</span>
            <span>注册</span>
            <span><i class="fa fa-arrow-up" aria-hidden="true"></i>返回顶部</span>
        </div>
        <div>
            <span>手机APP下载</span>
            <span>慢慢卖手机版</span>
            <span>--掌上比价平台</span>
            <span>m.manmanbuy.com</span>
        </div>
    </footer>
</body>
<script src="../lib/jquery/jquery.min.js"></script>
<script src="../lib/template/template.js"></script>
<script src="../js/base.js"></script>
<script type="text/template" id="kdjyhq">
    {{each result as val key}}
    <div class="yhq">
            <a href="./couponproduct.html?id={{val.couponId}}&title={{val.couponTitle}}">
                <img src='{{val.couponImg}}' alt="">
                <div>{{val.couponTitle}}</div>
            </a>
        </div>
    {{/each}}
</script>
<script>
    kdj();

    function kdj() {
        $.ajax({
            type: 'get',
            url: 'http://193.112.55.79:9090/api/getcoupon',
            dataType: 'json',
            success: function (res) {
                console.log(res);
                var htmlStr = template('kdjyhq', res);
                $('.content').html(htmlStr);
            }
        })
    }
</script>

</html>